package com.yaorange.springsecuirtydemo.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author coach tam
 * @email 327395128@qq.com
 * @values 坚持灵活 灵活坚持
 * @since 2024/5/27
 */
@RestController
@RequestMapping("/student")
public class StudentController {
    @GetMapping("/add")
//    @PreAuthorize("hasAnyAuthority('student:add')")
    @PreAuthorize("@ss.hasPermi('student:add')")
    public String add() {
        return "add student";
    }

    @GetMapping("/delete")
//    @PreAuthorize("hasAnyAuthority('student:delete')")
    @PreAuthorize("@ss.hasPermi('student:delete')")
    public String delete() {
        return "delete student";
    }
}
